﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DevExpress.Xpo;
namespace ChuanPlus
{
    class SampleDetails : XPLiteObject
    {
        int fSampleDetailsID;
        [Key(true)]
        public int SampleDetailsID
        {
            get { return fSampleDetailsID; }
            set { SetPropertyValue<int>("SampleDetailsID", ref fSampleDetailsID, value); }
        }
        Stock fStockID;
        public Stock StockID
        {
            get { return fStockID; }
            set { SetPropertyValue<Stock>("StockID", ref fStockID, value); }
        }
        double fQuantity;
        public double Quantity
        {
            get { return fQuantity; }
            set { SetPropertyValue<double>("Quantity", ref fQuantity, value); }
        }
        [Association("Sample-SampleDetails")]
        Sample fSampleID;
        public Sample SampleID
        {
            get { return fSampleID; }
            set { SetPropertyValue<Sample>("SampleID", ref fSampleID, value); }
        }
        public SampleDetails(Session session) : base(session) { }
        public SampleDetails() : base(Session.DefaultSession) { }
        public override void AfterConstruction() { base.AfterConstruction(); }
        /// <summary>
        /// Initializes a new instance of the SampleDetails class.
        /// </summary>
        /// <param name="fStockID"></param>
        /// <param name="fQuantity"></param>
        /// <param name="fSampleID"></param>
        public SampleDetails(Stock fStockID, double fQuantity)
        {
            this.fStockID = fStockID;
            this.fQuantity = fQuantity;
           
        }
    }
}
